﻿using System;
using Adf.Core.Entity;
using CYQ.Data.Table;

namespace Test.Interface
{
    public interface IOrg
    {
        /// <summary>
        /// 初始化值
        /// 袁赛
        /// 2020-5-22
        /// </summary>
        /// <returns></returns>
        MDataRow InitDataRow();

        /// <summary>
        /// 获得实体
        /// 袁赛
        /// </summary>
        /// <param name="sOrgCode">通知编号</param>
        /// <param name="bCache">是否启用缓存</param>
        /// <returns></returns>
        MDataRow GetEntityWithOrgCode(string sOrgCode, bool bCache = false);



        /// <summary>
        /// 增加数据
        /// 袁赛
        /// </summary>
        /// <param name="dataRow"></param>
        /// 
        /// <returns></returns>

        ExeMsgInfo Add(MDataRow dataRow);

        /// <summary>
        /// 更新数据
        /// 袁赛
        /// </summary>
        /// <param name="dataRow"></param>
        /// <returns></returns>

        ExeMsgInfo Update(MDataRow dataRow);

        /// <summary>
        /// 删除数据
        /// 袁赛
        /// </summary>
        /// <param name="sOrgCode">通知编号</param>
        /// <returns></returns>

        ExeMsgInfo DeleteByOrgCode(string sOrgCode);



        /// <summary>
        ///获得列表
        /// 袁赛
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页大小</param>
        /// <param name="orderBy">排序</param>
        /// <param name="recordCount">总数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns></returns>

        MDataTable GetList(int pageIndex, int pageSize, String orderBy, ref int recordCount, ref int pageCount);
    }
}